<?php include "../public/header.php";?>
<?php include "../public/header_edit.php";?>
<body id="optPage">
<form class="layui-form layui-form-pane" id="commentForm">
    <div class="page-title"><div class="page-title-con"><span>新建档案</span><div class="move_title"></div><?php include "../public/sub.php";?></div></div>
    <div class="main-container">

        <div class="block-generic">


            <div class="layui-form-item">
                <div class="layui-row layui-col-space10">
                    <div class="edittits"><span>基本信息</span></div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-md12">
                        <label class="layui-form-label">归档分类</label>
                        <div class="layui-input-block">
                            <div id="filenav"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script>

    var param_ids = getQueryVariable('ids') || '';

    layui.use(['laytp', 'form'], function() {
        var form = layui.form, layer = layui.layer;
        render_input_attr();

        facade.ajax({type: 'get', url: ask_engin_elecfile_gui}).done(function(res){
            if (res.code === 2000) {
                var data = res.data;

                xmselect_dan('filenav', res.data.filenav, '');

                render_date();
                render_from();
            }
        });

        form.on('submit(add)', function(data){

            data.field.ids = param_ids;
            facade.ajax({url: ask_engin_elecfile_gui, data:data.field}).done(function(res){
                if (res.code === 2000) {
                    dataPostTimeOut();
                }
            });

            return false;
        });

    });


</script>
</body>
</html>
